package cn.iocoder.yudao.module.dlbz.dal.mysql.suppliermoney;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.dlbz.dal.dataobject.suppliermoney.SupplierMoneyDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.dlbz.controller.admin.suppliermoney.vo.*;

/**
 * 供应商支付记录 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface SupplierMoneyMapper extends BaseMapperX<SupplierMoneyDO> {

    default PageResult<SupplierMoneyDO> selectPage(SupplierMoneyPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<SupplierMoneyDO>()
                .eqIfPresent(SupplierMoneyDO::getSupplierId, reqVO.getSupplierId())
                .eqIfPresent(SupplierMoneyDO::getMoneyAll, reqVO.getMoneyAll())
                .eqIfPresent(SupplierMoneyDO::getMoneyMy, reqVO.getMoneyMy())
                .betweenIfPresent(SupplierMoneyDO::getMoneyTime, reqVO.getMoneyTime())
                .eqIfPresent(SupplierMoneyDO::getState, reqVO.getState())
                .betweenIfPresent(SupplierMoneyDO::getSettleAccountsTime, reqVO.getSettleAccountsTime())
                .eqIfPresent(SupplierMoneyDO::getImg, reqVO.getImg())
                .betweenIfPresent(SupplierMoneyDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(SupplierMoneyDO::getId));
    }

}